package com.bw.crop;

import io.minio.MinioClient;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.scheduling.annotation.EnableScheduling;

@SpringBootApplication
@MapperScan("com.bw.crop.mapper")
@ComponentScan({"com.bw.crop","com.bw.aop"})
@EnableScheduling
public class CropApp {
    public static void main(String[] args) {
        SpringApplication.run(CropApp.class,args);
    }
    @Bean
    public MinioClient getClient() throws Exception {
        MinioClient minioClient = new MinioClient(
                "http://10.39.7.16:9000",
                "lw1W8oLUbAKdO3J7",
                "51hvGKiY9HW9Wpn8A8htsBm1eO1vOmEN"
        );
        return minioClient;
    }
}
